Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new Array and Map types #219

Open
wants to merge 31 commits into
base: v5
Choose a base branch
from
Open

add new Array and Map types #219

wants to merge 31 commits into from

Conversation

Geal
Copy link
Contributor

@Geal Geal commented May 23, 2024

this tries to enforce that all array elements are of the same type, but this is not very strict at the moment, it does not look at lower levels of composite types.

breaking changes:

  • in the Datalog language, sets will now be delimited by '{' and '}' instead of '[' and ]'. Arrays are now delimited by '[' and ']'
  • parameter names must now start with a letter

Todo:

  • array serialization
  • array parsing
  • existing operations for array: length, equal, not equal, contains, prefix, suffix
  • map serialization
  • map parsing
  • existing operations for map: length, equal, not equal, contains, prefix, suffix
  • new operations for array: get (with integer index), closures
  • new operations for map: get (with integer or string index), closures

Geal added 3 commits May 23, 2024 15:32
this tries to enforce that all array elements are of the same type, but
this is not very strict at the moment, it does not look at lower levels
of composite types.

**breaking change**: in the Datalog language, sets will now be delimited
by '{' and '}' instead of '[' and ]'. Arrays are now delimited by '['
and ']'
This introduces a breaking change: now parameter names need to start
with a letter
@Geal Geal marked this pull request as ready for review May 23, 2024 14:27
@Geal Geal changed the base branch from v5 to main May 23, 2024 14:31
@Geal Geal changed the base branch from main to v5 May 23, 2024 14:32
Geal added 2 commits May 23, 2024 22:05
it accepts integers, strings and parameters as keys
@Geal Geal changed the title add a new Array type add new Array and Map types May 23, 2024
Copy link

codspeed-hq bot commented May 26, 2024

CodSpeed Performance Report

Merging #219 will not alter performance

Comparing map-array (6d3b426) with v5 (22bd667)

Summary

✅ 12 untouched benchmarks

Copy link

codecov bot commented May 26, 2024

Codecov Report

Attention: Patch coverage is 72.92419% with 75 lines in your changes missing coverage. Please review.

Project coverage is 68.83%. Comparing base (525c278) to head (0399b2f).

Current head 0399b2f differs from pull request most recent head d5003f3

Please upload reports for the commit d5003f3 to get more accurate results.

Files Patch % Lines
biscuit-parser/src/builder.rs 41.46% 24 Missing ⚠️
biscuit-auth/src/token/builder.rs 78.88% 19 Missing ⚠️
biscuit-auth/src/datalog/expression.rs 81.33% 14 Missing ⚠️
biscuit-parser/src/parser.rs 55.00% 9 Missing ⚠️
biscuit-auth/src/datalog/mod.rs 0.00% 4 Missing ⚠️
biscuit-auth/src/format/convert.rs 78.94% 4 Missing ⚠️
biscuit-auth/src/datalog/symbol.rs 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##               v5     #219      +/-   ##
==========================================
+ Coverage   68.57%   68.83%   +0.25%     
==========================================
  Files          25       25              
  Lines        5681     5932     +251     
==========================================
+ Hits         3896     4083     +187     
- Misses       1785     1849      +64     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Implementation
Development

Successfully merging this pull request may close these issues.

2 participants